﻿@model ProductIntroduction.Models.Config

@{
    ViewBag.Title = "Chỉnh sửa Cấu hình trang web";
}

<h2>Sửa cấu hình trang web</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Cấu hình trang web</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.WebsiteTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.WebsiteTitle)
            @Html.ValidationMessageFor(model => model.WebsiteTitle)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.WebsiteName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.WebsiteName)
            @Html.ValidationMessageFor(model => model.WebsiteName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.WebsiteSlogan)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.WebsiteSlogan)
            @Html.ValidationMessageFor(model => model.WebsiteSlogan)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Banner)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Banner)
            @Html.ValidationMessageFor(model => model.Banner)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Footer)
        </div>
        <div class="editor-field">
            <textarea class="ckeditor" name="Footer">@Html.DisplayFor(model => model.Footer)</textarea>
            <span class="field-validation-valid" data-valmsg-for="Footer" data-valmsg-replace="true"></span>
        </div>
        
        <p>
            <input type="submit" value="Lưu lại" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Quay lại", "Index")
</div>

<script type="text/javascript">
    CKEDITOR.replace('Footer');
</script>